<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./js/vue.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="app">

    </div>
</body>
<script>
    const vm = new Vue({
        el: "#app",
        data: {
            list: [
                7, 2, 3, 4, 5
            ]
        }
    })
    console.log(vm.list)
    vm.list.pop()
    vm.list.push(88)
    vm.list.reverse()
    vm.$set(vm.list, 0, 99)//设置
    Vue.set(vm.list, 0, 100)//全局设置
    vm.$delete(vm.list, 1)//删除
    vm.list.sort((a, b) => {//排序
        return b - a
    })
    console.log(vm.list)
    vm.list.splice(0, 0, 66)
    console.log(vm.list)
    var newarr = vm.list.some(item => {//部分满足
        return item > 3
    })
    console.log(newarr)
    var newarr2 = vm.list.filter(item => {//过滤
        return item <= 3
    })
    console.log(newarr2)

    var newarr3 = vm.list.every(item => {//全满足
        return item > 4
    })
    console.log(newarr3)
    var str = vm.list.join("")//拼接
    console.log(str)

</script>

</html>